home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business Heaven
/
Business Heaven.iso
/
network
/
doc_proc
/
workfile.doc
< prev
Wrap
Text File
|
1992-11-08
|
20KB
|
247 lines
*************************************
* *
* W O R K F I L E S *
* ON THE MVS/XA OPERATING SYSTEM *
* *
*************************************
John S. Ward
03/15/93
EJECT
)F FUNCTION -
Batch and TSO procedures have been developed to allow the user
to create "work" disk data sets that will stay on the system for
24 to 48 hours. A "work" or "day" data set will be erased during
system backups when its creation date is less than the Julian date
of the backup minus 1. These data sets will not be backed up; i.e.,
they cannot be retrieved from backup tapes if they are inadvertently
erased or destroyed by the user.
Users are encouraged to utilize workfile space when at all
possible. Under the GSU disk space control system, DASD tracks
used for workfile datasets are not accumulated against a user's
maximum allowed DASD tracks.
Examples:
1. %WORKFILE DSN(COBOL) DIR(10) QUAL(userid)
This example creates a partitioned data set called
userid.DAY.COBOL with a high level qualifier "userid" that the
user has access authority to, with a logical record length of 80
characters and a blocksize of 6320. The data set will have a
primary allocation of 1 track and a secondary allocation of
3 tracks.
2. %WORKFILE DSN(LIST) RECFM(VBA) LRECL(137) BLKSIZE(5895)
This example creates a variable blocked sequential data set called
userid.DAY.LIST. The logical record length is 137 characters
(4 bytes for the record length, 1 byte for the ANSI carriage
control character and 132 bytes for data) with a blocksize of
5895 characters. The data set has a primary allocation of 1
track and a secondary allocation of 3 tracks.
3. %WORKFILE DSN(TEST.JCL) UNIT(BLK) AVGB(6320) SPACE(10) DIR(20)
This example creates a fixed blocked partitioned data set
called userid.DAY.TEST.JCL. The logical record length is
80 bytes with a blocksize of 6320. The data set is allocated
in blocks of 6320 characters; the primary allocation is 10 of
such blocks with the secondary being 3 blocks.
Execution Results:
The %WORKFILE clist sets the &LASTCC symbolic variable and sends a
message regarding the status of the allocation:
&LASTCC MESSAGE
--------------------------------------------------------------------
0 dataset name HAS BEEN ALLOCATED
4 dataset name ALREADY EXISTS
8 INVALID LRECL (n) FOR BLKSIZE (n) FOR RECFM
(FB|FBA) DATASET
8 ERROR IN ALLOCATION OF dataset name
8 dataset name ERROR: ERROR PROCESSING REQUESTED
DATASET
8 dataset name ERROR: INVALID DATA SET NAME, xxxx
8 dataset name ERROR: VOLUME NOT ON SYSTEM
12 INSUFFICIENT AUTHORITY
12 USER NOT MEMBER OF GROUP
16 DSN PARAMETER MUST BE SPECIFIED
16 UNIT(BLK) SPECIFIED, AVGB(N) MUST BE SPECIFIED
16 INVALID DSORG - value - SPECIFIED. MUST BE
PS, PO or DA
A clist that you write to call %WORKFILE could test the value of
&LASTCC to determine the success or failure of the data set
allocation.
TSO Execution
The TSO clist can be called from the 6 screen using the command
%WORKFILE or from any ISPF main command line by typing TSO
%WORKFILE. Below is a description of the parameters and their
defaults:
BATCH Execution
The JCL procedure called WORKFILE can be executed to allocate a
workfile during a batch job stream by coding:
//STEP1 EXEC WORKFILE,param1,param2
Execution Results:
The WORKFILE procedure actually sets up a batch TSO environment and
executes the %WORKFILE clist. Using this technique, the same
messages described above will be printed on the job output.
Similarly, the step return code will be set to the value of the
&LASTCC symbolic variable. Successive job steps can test the value
of this return code to determine whether to continue execution.
For example, you may not want to execute the next step in your job
stream if the workfile you are requesting to allocate is already
allocated. In which case, you would code:
//STEP1 EXEC WORKFILE,DSN='TEST',UNIT=BLK,AVGB=6320
//STEP2 EXEC PGM=MYPGM,COND=(0,NE,STEP1.WORKFILE)
In the next example, you do want to execute the next step even if
the workfile has previously been allocated. That is, the only
condition under which the next step should not be executed is if
allocation failed - the return code is 8 or 16. You could code:
//STEP3 EXEC WORKFILE,DSN='TEST2',RECFM=VBA,LRECL=137,
// BLKSIZE=5895
//STEP4 EXEC PGM=MYPGM,COND=(4,LT,STEP3.WORKFILE)
In the above COND= parameters, please note that the stepname.WORKFILE
is required. For more information, please see the MVS/XA JCL
Reference Manual GC28-1352.
)X SYNTAX -
FOR TSO:
WORKFILE DSN(data set name) UNIT(TRK|CYL|BLK) SPACE(n) DIR(n)
BLKSIZE(n) AVGB(n) LRECL(n) RECFM(F|FB|FBA|V|VB|VBA|U)
DSORG(PS|PO|DA) QUAL(userid)
FOR BATCH:
//stepname EXEC WORKFILE,DSN='dataset.name',UNIT=TRK|CYL|BLK,
// SPACE=n,SEC=n,DIR=n,BLKSIZE=n,AVGB=n,LRECL=n,
// RECFM=F|FB|FBA|V|VB|VBA|U,DSORG=PS|PO|DA,QUAL=userid
REQUIRED -
for TSO: DSN(data set name)
for BATCH: DSN=datasetname
DEFAULTS - FOR BOTH TSO AND BATCH:
UNIT(TRK) SPACE(1) SEC(3) DIR(0) BLKSIZE(6320) LRECL(80)
RECFM(FB) DSORG(PS) QUAL(your userid)
)O OPERANDS - BOTH TSO AND BATCH FORMATS ARE LISTED
))DSN(data set name)
DSN= - This is a required parameter and it is
used to generate the name of the
workfile which will be
USERID.DAY.DSN. DSN value for batch must
be in quotes if it includes periods (.).
))UNIT(TRK|CYL|BLK)
UNIT=TRK|CYL|BLK - This parameter describes the space unit
to be used in allocating the data set.
DEFAULT: TRK
))SPACE(n)
SPACE=n - This parameter represents the primary
space allocation for the data set.
DEFAULT: 1
))SEC(n)
SEC=n - This parameter represents the secondary
space allocation for the data set.
DEFAULT: 3
))DIR(n)
DIR=n - This parameter represents the number of
directory blocks if the data set is to
be allocated as a partitioned data set
(PDS).
DEFAULT: 0 (the data set is to be
sequential)
))BLKSIZE(n)
BLKSIZE=n - This parameter specifies the blocksize
for the data set.
DEFAULT: 6320
))AVGB(n)
AVGB=n - This parameter describes the average
block length and is required if
UNIT(BLK) was specified.
DEFAULT: none
))LRECL(n)
LRECL=n - This parameter describes the logical
record length for the data set. If
RECFM(FB) or RECFM(FBA) is specified,
then LRECL(n) must be an integral
multiple of BLKSIZE(n).
DEFAULT: 80
))RECFM(F|FB|FBA|
V|VB|VBA|U)
RECFM=F|FB|FBA|
V|VB|VBA|U - This parameter describes the record
format of the data set: F - fixed,
FB - fixed blocked, FBA - fixed blocked
with ANSI carriage control,
V - variable, VB - variable blocked,
VBA - variable blocked with ANSI
carriage control,
U - records are of undefined length.
DEFAULT: FB
))DSORG(PO|PS|DA)
DSORG=PO|PS|DA - This parameter describes the data set
organization: PO - partitioned organization,
PS - physical sequential, DA - direct access.
DEFAULTS: if DIR is specified, the default for
DSORG is PO. if DIR is not specified, the
default for DSORG is PS.
))QUAL(userid)
QUAL=userid - This parameter describes the high level
qualifier that the system will use when
creating the workfile. This must be a
valid group or userid to which the user
has access authority.
DEFAULT: your userid